#pragma once
#include <D3DX9.h>
#include <ddraw.h>
#include "ddUtilities.h"
#include "player.h"

extern LPDIRECTDRAW7			lpdd7;
extern LPDIRECTDRAWPALETTE		lpddpal;
extern LPDIRECTDRAWSURFACE7		lpddsprimary;
extern LPDIRECTDRAWSURFACE7		lpddsback;
extern LPDIRECTDRAWSURFACE7		lpddsbackground;
extern LPDIRECTDRAWCLIPPER		lpddclipper;
extern DDSURFACEDESC2			ddsd;    

class ddBitmap :
	public BITMAP
{
public:
	ddBitmap(void);
	~ddBitmap(void);
	LPDIRECTDRAWSURFACE7 loadBitmapFile(LPCWSTR filename, ddUtilities ddUtil, bool colorkey = false);
	int ddDrawFullBackground(player player1, LPDIRECTDRAWSURFACE7 source, LPDIRECTDRAWSURFACE7 destination);
	int ddDrawSprite(LPDIRECTDRAWSURFACE7 source, LPDIRECTDRAWSURFACE7 destination, int x, int y, int width, int height, int row, int column);
};
